package cn.wolfcode.springboot_consumer._02_consumer_mode;

import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(
        consumerGroup = "boot-consumer-demo",
        topic = "boot-consumer-mode",
        //messageModel=MessageModel.CLUSTERING 集群
        messageModel=MessageModel.BROADCASTING //广播

)
public class Consumner1 implements RocketMQListener<String>{

    @Override
    public void onMessage(String message) {
        System.out.println("消费者1的消息内容是:"+message);

    }
}
